package com.cskaoyan.controller;


import com.cskaoyan.bean.baseresultVO.BaseData;
import com.cskaoyan.bean.baseresultVO.BaseParam;
import com.cskaoyan.bean.baseresultVO.BaseRespVo;
import com.cskaoyan.bean.domain.Log;
import com.cskaoyan.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author looper
 * @since 2021-11-29
 */
@RestController
@RequestMapping("admin/log")
public class LogController {

    @Autowired
    LogService service;

    //负责回显,插入使用aop
    @GetMapping("list")
    public BaseRespVo getList(BaseParam baseParam ,String name) {
        //name对应这Log类中的admin
        Log log = new Log();
        log.setAdmin(name);
       BaseData baseData = service.getList(baseParam,log);
      return BaseRespVo.ok(baseData);

    }


}

